function value = readFOP(RawFOP,var)
%readFOP - reading data from Opera Preferences
%
% value = readFOP(RawFOP,var)
%
% Let RawFOP be the raw data of the 'OperaPreferences.xlsx' file, provided
% by [~,~,RawFOP] = xlsread('OperaPreferences.xlsx').
% This function extracts the value in the third column of RawFOP which 
% corresponds to the variable (in string format) var in the second column
% of RawFOP.

% G. Teza, 2020

Raw2 = RawFOP(:,2);
Raw2s = char(Raw2{:});
Raw3 = RawFOP(:,3);
Raw3s = char(Raw3{:});

nrow = size(Raw2,1);

for k = 1:nrow
    Ik = strcmpi(strtrim(Raw2s(k,:)),var);
    if Ik
        value = strtrim(Raw3s(k,:));
    end
end